Capital Gain Result
Tracks the result of a capital gain computation, including both short term and long term gains. The class is immutable. Updated by Stuart Beesley February 2024 - since MD2024(5100) to allow a more 'complete' set of values to be stored along with the updated CostCalculation class. WARNING: Check isValid() before using results. If not valid then you should assume zeros and no gain calculation!
Author
Sean Reilly & Stuart Beesley
Since
2024-02-01
Constructors
Constructor - invalid result with an error message.
Constructor - invalid result with an error message.
Constructor - valid (simple) result with an optional message key.
Constructor - valid (simple) result with an optional message key.
Constructor - valid (complete) result with an optional message key.
Constructor - valid (complete) result with an optional message key.
Properties
true when the sale(s) were selected by tax date - a sale's tax date, not its transaction date, fell within the date range asked for. Default false. @since MD2027
The three 'available' fields (this one, totSaleSharesAvailableShort, totSaleSharesAvailableLong) are only calculated for average cost securities, and only when CostCalculation.CALCULATE_AVG_COST_DOUBLE_CATEGORY is on. Otherwise all three are 0 (lot-based securities gave -1 before MD2027).
true when the calculation used tax dates for the long/short term split (and for the order of a gains list). Default false. @since MD2027